<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="spring" 	uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="tiles" 	uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c"		uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" 	uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page language="java" pageEncoding="utf-8"%>

<script type="text/javascript">
$(document).ready(function(){
	setMenuSelection("adauga");
	
    $("#tabCompanyCard").kendoTabStrip({
        animation:  {
            open: {
                effects: "fadeIn"
            }
        }
    });	  
    
    $("#pStatus").kendoDropDownList();
    
    
    $("#btCompanyList").kendoButton({
        icon: "funnel"
    });

    $("#btCompanyCard").kendoButton({
        icon: "plus"
    });
    
    $("#btCompanyCardSubmit").kendoButton({
        icon: "tick"
    });

    $("#btCompanyCardReset").kendoButton({
        icon: "cancel"
    });
    
    $("#btCompanyCardApply").kendoButton({
        icon: "custom"
    });
    
    $("#pRefBank").kendoDropDownList();
    
});


function SubmitFormCompanyCard(pPostOperation){
	var formAction = $("#formCompanyCard").attr( 'action' );
	$("#formCompanyCard").attr('action', formAction + '?pPostOperation='+pPostOperation);
	$("#formCompanyCard").submit();
}


</script>

<CENTER>
<p style="text-align: left;">
	<button id="btCompanyList" type="button" onclick="javascript:window.open('vizualizeazaFirme', 	target='_self')";>	Lista Firme</button>
	<button id="btCompanyCard" type="button" onclick="javascript:window.open('adaugaFirme', 		target='_self')";>	Adaugă Firma</button>
	<c:if test="${errorMessage != '' &&  errorMessage != '0'}">
		<span id="errorMessage" class="errorMessage"> ${errorMessage} </span>
	</c:if>
	
</p>
<form:form id="formCompanyCard" method="post" commandName="companyItem" action="adaugaFirme">
<div id="tabCompanyCard" style="text-align: left;" >
	<ul>
	    <li class="k-state-active">
	              Firma
	    </li>
	</ul> 
	<div>
		<div class="k-block k-shadow">
			<ul class="forms" style="font-size: 14px;">
				<form:hidden id="pId" path="id" name="id"/>
				<li>
					<label  for="pIdno" class="required">Cod fiscal: </label> 			
					<form:input type="text" id="pIdno" 	 				path="idno"  				name="idno" 	maxlength="13" style="width:150px;" class="k-textbox" required="true"/> 
				</li>
				<li>
					<label  for="pCompanyName" class="required">Denumire firmă: </label> 
					<form:input type="text" id="pCompanyName" 			path="mdValue"  		name="mdValue" style="width:250px;"  class="k-textbox"  required="true"/>
				</li>
				<li>
					<label  for="pBoss" >Nume, Prenume director: </label>
					<form:input type="text" id="pBoss" 	path="bossname" 	name="bossname" style="width:250px;"  class="k-textbox"/>
				</li>
				<li>
					<label  for="pContabil" >Nume, Prenume contabil: </label>
					<form:input type="text" id="pContabil" 	path="contabil" 	name="contabil" style="width:250px;"  class="k-textbox"/>
				</li>
				<li>							
					<label  for="pAddress" >Adresa juridică:  </label> 	
					<form:textarea  type="text" id="pJuridicAddress" 	path="address"  		name="address" style="width:250px;"  class="k-textbox"></form:textarea> 
				</li><li>
					<label  for="pPhone" >Telefon:  </label> 					
					<form:input type="text" id="pPhone" 			path="phone"  			name="phone" 	style="width:150px;"  class="k-textbox"  />
				</li>				<li>
					<label for="pRefBank"	 >Banca:</label>		
					<form:select id="pRefBank" path="refBank.id" style="width:300px;" >
						<option value="-1" label=" - Selectati - " ></option>
	     					<form:options items="${refBankCBX}" itemValue="id" itemLabel="mdValue"/>
	   				</form:select>		
				</li>
				<li>
					<label for="pBankCode"	>Codul băncii:</label> 			
					<form:input type="text" id="pBankCode"	  path="bankCode"  	 name="bankCode" style="width:250px;"  class="k-textbox" />
				</li>
				<li>
					<label  for="pCont" >Cont bancar:  </label> 					
					<form:input type="text" id="pCont" 			path="cont"  			name="cont" 	style="width:150px;"  class="k-textbox"  />
				</li>
				<li>
					<label  for="pTVA" >Cod TVA:  </label> 					
					<form:input type="text" id="pTVA" 			path="tva"  			name="tva" 	style="width:150px;"  class="k-textbox"  />
				</li>
				<form:input type="hidden" id="plogoname" 			path="logoname"  			name="logoname" 	  />
				
<!-- 				<li>							 -->
<!-- 					<label  for="pSkype" >Messenger:  </label> 							 -->
<%-- 					<form:input type="text" id="pSkype" 				path="skype"  				name="skype" 		style="width:150px;"  class="k-textbox"  />  --%>
<!-- 				</li><li>							 -->
<!-- 					<label  for="pEmal" >E-mail:  </label> 								 -->
<%-- 					<form:input type="text" id="pEmal" 					path="emal"  				name="emal" 		style="width:150px;"  class="k-textbox"  />  --%>
<!-- 				</li> -->
			</ul>	
		</div>
	</div>
<!-- </div> -->
<p style="text-align: right;">
	<button id="btCompanyCardApply"		type="button" onclick="SubmitFormCompanyCard('remain')" 	>Aplică</button>
	<button id="btCompanyCardSubmit" 		type="button" onclick="SubmitFormCompanyCard('close')"  >Salvează</button>
	<button id="btCompanyCardReset" 		type="reset"  onclick="javascript: window.history.back();">Anulează</button>
</p> 		
</form:form> 
    
</CENTER>
<style scoped>
     #tabCompanyCard ul {
         list-style-type: none;
         margin: 0;
         padding: 0;
     }
     #tabCompanyCard li {
         margin: 10px 0 0 0;
     }

     label {
         display: inline-block;
         width: 300px;
         text-align: right;
     }
     
     input {
     	height: 10px;
     }

     .required {
         font-weight: bold;
     }

     .accept, .status {
         padding-left: 90px;
     }

     .valid {
         color: green;
     }

     .invalid {
         color: red;
     }
     span.k-tooltip {
         margin-left: 6px;
     }
 </style>



